<div class="container" style="margin:0 0 0 0;padding:0 0 0 0">
    <div class="row page-header-new" style="margin:0 0 0 0">
        <div class="page-title">
            <h4 >组织机会列表</h4>
        </div>
    </div>
    <div class="body">
        <div class="table-title">
            <div class="col-md-12 col-sm-12">
                <div class="col-md-3 col-sm-3" >
                    <div class="btn-group" ng-init="showWhole=true">
                        <button class="{{showWhole?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width:115px" ng-click="showWhole=true">完整查询</button>
                        <button class="{{showWhole?'btn btn-default':'btn btn-info'}}" style="line-height: 1;width:115px" ng-click="showWhole=false">快捷查询</button>
                    </div>
                </div>
                <!--<div class="col-md-3 col-sm-3">-->
                    <!--<div class="btn-group" ng-init="showResponsible=true">-->
                        <!--<button class="{{showResponsible?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width:115px" ng-click="showResponsible=true">负责的</button>-->
                        <!--<button class="{{showResponsible?'btn btn-default':'btn btn-info'}}" style="line-height: 1;width:115px" ng-click="showResponsible=false">参与的</button>-->
                    <!--</div>-->
                <!--</div>-->
                <div class="col-md-4 col-sm-4">
                    <input type="text" placeholder=" 搜索" style="border-radius: 5px;width: 80%;height: 28px" ng-model="searchInfo">
                </div>
                <div class="col-md-2 col-sm-2" ng-init="showFinish=false">
                    <button class="{{showFinish?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width:150px" ng-click="showFinish=!showFinish">包含我已完成的</button>
                </div>
            </div>
        </div>
        <div class="table-title" ng-show="showWhole">
            <div class="col-md-12 col-sm-12">
                <div class="col-md-1 col-sm-1">
                    <h4 style="margin-top: 4px">筛选：</h4>
                </div>
                <div class="col-md-10 col-sm-10">
                    <div class="btn-group" ng-init="institution=false;report=false;customer=false;area=false;location=false;product=false;label=false;partner=false;enemy=false;season=false;status=false;state=false;">
                        <button class="{{report?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(0)">汇报链</button>
                        <button class="{{customer?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(1)">客户</button>
                        <button class="{{area?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(2)">地域</button>
                        <button class="{{location?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(3)">地点</button>
                        <button class="{{product?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(4)">产品线</button>
                        <button class="{{tag?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(5)">标签</button>
                        <button class="{{partner?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(6)">合作伙伴</button>
                        <button class="{{enemy?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(7)">竞争对手</button>
                        <button class="{{season?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(8)">财季</button>
                        <button class="{{status?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(9)">状况</button>
                        <button class="{{state?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width12}}px" ng-click="setFilter(10)">状态</button>
                    </div>
                </div>
                <div class="col-md-1 col-xm-1">
                    <button class="btn btn btn-info" style="line-height: 1;width:100%" ng-click="resetOption()">重置</button>
                </div>
            </div>
        </div>
        <div class="table-title" ng-hide="showWhole">
            <div class="col-md-12 col-sm-12">
                <div class="col-md-1 col-sm-1">
                    <h4 style="margin-top: 4px">筛选：</h4>
                </div>
                <div class="col-md-10 col-sm-10">
                    <div class="btn-group" ng-init="before=false;nowAll=false;nowIn=false;nextIn=false;future=false">
                        <button class="{{before?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width7}}px" ng-click="chooseInstitution()">原来的</button>
                        <button class="{{nowAll?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width7}}px" ng-click="chooseReport()">本季度所有</button>
                        <button class="{{nowIn?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width7}}px" ng-click="chooseCustomer()">本季度必进</button>
                        <button class="{{nextIn?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width7}}px" ng-click="chooseInstitution()">下季度必进</button>
                        <button class="{{future?'btn btn-info':'btn btn-default'}}" style="line-height: 1;width: {{width7}}px" ng-click="chooseInstitution()">未来的</button>
                    </div>
                </div>
                <div class="col-md-1 col-xm-1">
                    <button class="btn btn btn-info" style="line-height: 1;width:100%" ng-click="resetOption()">重置</button>
                </div>
            </div>
        </div>
        <div class="table-body">
            <table class="datatable table table-hover dataTale">
                <thead>
                <tr>
                    <th>#</th>
                    <th>负责人</th>
                    <th>客户名称</th>
                    <th>机会名称</th>
                    <th>机会代码</th>
                    <th style="min-width: 100px">金额（万元）</th>
                    <th>日期</th>
                    <th>终止状态</th>
                    <th>进行状况</th>
                </tr>
                </thead>
                <tbody ng-repeat="item in items|orderBy:orderList:reverse|filter:searchInfo|filter:startFilter" ng-dblclick="selectOne(item)" style="border-top: 1px solid #dddddd;">
                <tr>
                    <td>{{$index+1}}</td>
                    <td>{{item.ownerName}}</td>
                    <td>{{item.customName}}</td>
                    <td>{{item.name}}</td>
                    <td>{{item.code}}</td>
                    <td>{{item.amount}}</td>
                    <td>{{item.actualDate}}</td>
                    <td>{{getState(item.state)}}</td>
                    <td>{{getStatus(item.status)}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="row">
            <div class="pull-left" style="margin-top:20px">
                &nbsp;&nbsp;&nbsp;&nbsp;总计机会数目 : {{items.length}}
            </div>
            <div class="pull-right"style="margin-right: 20px">
                <nav>
                    <ul class="pagination">
                        <li>
                            <a ng-click="Previous()" role="button">
                                <span role="button">上一页</span>
                            </a>
                        </li>
                        <li ng-repeat="page in pageList" ng-class="{active: isActivePage(page)}" role="button">
                            <a ng-click="selectPage(page)" >{{ page }}</a>
                        </li>
                        <li>
                            <a ng-click="Next()" role="button">
                                <span role="button">下一页</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
    </div>
</div>